<%@page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
<%@page session="false"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<%@ taglib uri="http://www.springframework.org/tags/form" prefix="form" %>

		
			<form:form method="post" action="pesquisar" modelAttribute="nomecontato" cssClass="form-inline">
				<div class="form-group">
					<input type="text" name="nome" class="form-control"  placeholder="digite nome do contato">
					<input type="submit" value="Pesquisar" class="btn btn-large btn-primary" />
				</div>
			</form:form>
		
		
			<h2>Lista de Contatos</h2>
	
			<table class="table table-hover">
			<thead>
				<tr>
					<th>Nome</th>
					<th>E-mail</th>
					<th>Telefone</th>
				</tr>
			</thead>
			</tbody>
			
			<c:forEach var="contatoI" items="${contatos}">
				<tr>
					<td><a href="/agendaweb/pri/contato/?id=${contatoI.id}">${contatoI.nome}</a></td>
					<td>${contatoI.email}</td>
					<td>${contatoI.telefone}</td>
				</tr>
			</c:forEach>
			
			</tbody>
		</table>
  		 
